@file:Suppress("FINITE_BOUNDS_VIOLATION_IN_JAVA")

package xyz.labmem.base.sys.module.user.entity

import com.baomidou.mybatisplus.annotation.TableField
import com.baomidou.mybatisplus.annotation.TableName
import com.fasterxml.jackson.annotation.JsonIgnore
import com.fasterxml.jackson.annotation.JsonInclude
import io.swagger.annotations.ApiModel
import io.swagger.annotations.ApiModelProperty
import xyz.labmem.base.core.base.BaseEntity

/**
 * @Author lty
 * @Date 2021/12/15 16:33
 */
@TableName("sys_user")
@JsonInclude(JsonInclude.Include.NON_EMPTY)
@ApiModel(value = "用户列表")
class SysUser : SysUserData() {

    @ApiModelProperty(value = "密码", hidden = true)
    @JsonIgnore
    var password: String? = null

    @TableField("is_admin")
    @ApiModelProperty(value = "是否是管理员 0、不是 1、是")
    var admin: Int? = null

    @ApiModelProperty(value = "是否是超级管理员 0、不是 1、是")
    @TableField("super")
    var superr: Int? = null

    @ApiModelProperty(value = "联系方式")
    var phonenumber: String? = null

    @ApiModelProperty(value = "单位名称")
    var deptName: String? = null

    @ApiModelProperty(value = "单位地址")
    var deptAddres: String? = null

    @ApiModelProperty(value = "单位电话")
    var phone: String? = null

}

open class SysUserData : BaseEntity<SysUser>() {

    @ApiModelProperty(value = "账号")
    var account: String? = null

    @ApiModelProperty(value = "用户名")
    var username: String? = null

}
